The present invention relates to a technique for recognizing and detecting objects, such as fiducial mark and land, disposed on flat surfaces, such as printed circuit board and screen printing mask, based on pattern matching for positioning, measurement, and inspection.
Conventionally, pattern matching using the gray-scale normalized correlation method is often applied to recognition or detection of different objects of regular pattern in various images. This technique for matching a pattern image, i.e. a reference image for pattern matching with a corresponding input image, i.e. an image to be recognized or detected overlays the pattern image on the input image enclosed in a search frame to carry out product sum calculation for each corresponding pixel, obtaining a normalized correlation coefficient value. When calculating the normalized correlation coefficient value, the pattern image is shifted little by little with respect to the input image enclosed in the search frame to obtain its maximum value, i.e. repeated calculation processing is needed for the entire input image.
Conventional pattern matching using the normalized correlation method arises the following inconveniences:
1) With measuring apparatus based on pattern matching, fiducial marks, lands, etc. of solder levelers suffer a nonuniform density due to diffused reflection on their surface irregularities even with images subjected to image processing. Thus, when matching a pattern image derived from an original image with a corresponding input image, two images patterns with different nonuniform densities may cause lowered conformity of the density distribution therebetween to reduce a normalized correlation coefficient value, resulting in unsuccessful pattern matching.
Further, when matching an image of regular pattern with a corresponding input image, a difference in density distribution of the two images, i.e. insufficient similarity of the density distribution therebetween makes pattern matching unsuccessful. This raises a problem of difficult positional detection of a fiducial mark and a land of a solder leveler as shown in FIG. 12.
Furthermore, with conventional pattern matching, when an input image enclosed in a search frame is scanned by a pattern image, product sum processing is repeatedly carried out to obtain a particular normalized correlation coefficient value between the pattern image and the input image, necessitating enormous calculation processing time. Thus, a computer cannot carry out real time processing only with its central processing unit (CPU), requiring an exclusive fast image processing board, resulting not only in restricted development of a specific algorithm, but in increased manufacturing cost due to complex apparatus structure.
2) Conventionally, in order to detect character such as lot number, original images of the characters are previously stored as pattern images, and are subjected to pattern matching with corresponding input images of the characters. According to this method, if a substrate has shading, circuit sign drawn by silk-white paint (refer hereafter to as silk-white circuit sign), local dirt and the like on the background of an image of a character, a normalized correlation coefficient value between the pattern image and the input image is lowered considerably to disallow detection of the character.
Referring to FIG. 11, when a black lot number is partly printed on a dark-green resist placed on a unwired layout portion of a substrate, contrast cannot fully be obtained between the black character and the dark-green background shading to reach their unification, resulting in unsuccessful recognition of the lot number. Specifically, since the ensemble of the character and the background is assumed to form one pattern, pattern matching is affected by disturbances produced on the background.
Even with some disturbances produced on the background on an input image, human eyes can recognize a character based on feature information of the foreground of the image. In order to allow detection of characters regardless of disturbed background, a novel method is demanded which ensures pattern matching with regard to only the foreground with the background excluded.
3) For detection of lands, solders, mounted parts and the like of regular pattern, their original images are stored as pattern images, and are subjected to pattern matching with corresponding input images.
If disturbance factors such as wiring layout pattern, silk-white circuit sign, resist and flux exist on the background of pattern images in the vicinity of the lands, solders, etc., the background suffers a nonuniform density or nonuniform and complex density distribution. It is noted that the wiring layout pattern can produce a complex density distribution, and the silk-white circuit sign can cause a greater density peak on the background than that on the foreground. Resist and flux can cause a nonuniform density and variations in density level on the background.
Thus, due to unsuccessful pattern matching on the background, a normalized correlation coefficient value between a pattern image and a corresponding input image is lowered to make pattern detection unsuccessful.